import UIKit

import SnapKit

@objcMembers
public class GJFilterSliderView: UIView {
    // UILabel
    private lazy var dMinimalLabel: UILabel = {
        let points = UILabel()
        points.backgroundColor = .black
        points.alpha = 0.9
        points.isHidden = true
        points.isUserInteractionEnabled = true
        points.contentMode = .scaleAspectFill
        points.clipsToBounds = true
        points.layer.cornerRadius = 0
        points.layer.masksToBounds = true
        points.text = "标签".localized()
        points.textColor = .black
        points.font = .systemFont(ofSize: 13, weight: .regular)
        points.numberOfLines = 0
        points.textAlignment = .center
        return points
    }()

    // UILabel
    private lazy var bMemoizedLabel: UILabel = {
        let carbs = UILabel()
        carbs.backgroundColor = .black
        carbs.alpha = 0.8
        carbs.isHidden = true
        carbs.isUserInteractionEnabled = false
        carbs.contentMode = .scaleAspectFit
        carbs.clipsToBounds = true
        carbs.layer.cornerRadius = 2
        carbs.layer.masksToBounds = true
        carbs.text = "标签".localized()
        carbs.textColor = .black
        carbs.font = .systemFont(ofSize: 14, weight: .regular)
        carbs.numberOfLines = 0
        carbs.textAlignment = .right
        return carbs
    }()

    override init(frame: CGRect) {
        super.init(frame: frame)
        configExtensibleApproverViews()
    }

    required init?(coder: NSCoder) {
        super.init(coder: coder)
        configExtensibleApproverViews()
    }

    private func configExtensibleApproverViews() {
        // UI组件初始化
        /// UILabel
        vhbsView.addSubview(dMinimalLabel)
        dMinimalLabel.snp.makeConstraints { make in
            make.top.equalTo(10)
            make.leading.equalTo(10)
            make.trailing.equalTo(-10)
            make.bottom.equalTo(-10)
            make.centerX.equalTo(10)
            make.centerY.equalTo(10)
            make.width.equalTo(100)
            make.height.equalTo(50)
        }

        /// UILabel
        vhbsView.addSubview(bMemoizedLabel)
        bMemoizedLabel.snp.makeConstraints { make in
            make.top.equalTo(10)
            make.leading.equalTo(10)
            make.trailing.equalTo(-10)
            make.bottom.equalTo(-10)
            make.centerX.equalTo(10)
            make.centerY.equalTo(10)
            make.width.equalTo(100)
            make.height.equalTo(50)
        }
    }
}
